define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {
		function get_data_seckill_result(result) {
			if(HTTP_ISLOGIC) {
				result = '{"success": true,"msg": "","result": {"act_id": "001","act_name": "双十一大促销","pay_type": 1,"saving": 100,"goods":' +
					'{"id": "001","name": "电动手枪钻","order_id": "002","price": "300","discount_price": "200"}},"session": "7311da98bd0f18eb15a96bcb263f4153"}';
				return JSON.parse(result);
			} else
				return result;
		}

		//返回信息
		return {
			seckill_result: function(act_id, callback) {
				//post请求
				Http.post({
					method: 'marketing.seckill.result',
					session: '',
					act_id: act_id
				}, function(result) {
					//函数回调
					if(callback)
						callback(get_data_seckill_result(result).result);
				}, function(e) {

				}, function() {

				});
			},
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Prizewinning", factory);
});